package com.qijian.maindata.domain;

import com.qijian.common.enums.ApprovalDescriptionEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qijian.common.annotation.Excel;
import com.qijian.common.core.domain.BaseEntity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 台账-工具对象 main_ledger_tools
 *
 * @author qijian
 * @date 2024-05-07
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
@TableName("main_ledger_tools")
public class LedgerTools extends BaseEntity{
    private static final long serialVersionUID = 1L;

    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "${column.columnComment}")
    private Long id;

    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "厂区id")
    @NotNull(message = "厂区不能为空")
    private Long factoryAreaId;

    @Excel(name = "厂区")
    @NotBlank(message = "厂区名不能为空")
    private String factoryArea;

    @Excel(name = "工具编码")
    @ApiModelProperty(value = "工具编码")
    @NotBlank(message = "工具编码不能为空")
    private String toolCode;

    @Excel(name = "工具名称")
    @ApiModelProperty(value = "工具名称")
    @NotBlank(message = "工具名称不能为空")
    private String toolName;

    @Excel(name = "规格型号")
    @ApiModelProperty(value = "规格型号")
    @NotBlank(message = "规格型号不能为空")
    private String spec;

    @Excel(name = "数量")
    private BigDecimal quantity;

    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "使用部门")
    private Long useDeptId;

    @Excel(name = "使用部门")
    @ApiModelProperty(value = "使用部门名")
    @NotBlank(message = "使用部门不能为空")
    private String useDeptName;

    @Excel(name = "备注")
    private String remark;
}
